home *** CD-ROM | disk | FTP | other *** search
- /* Bevel (obj)
-
- Bevel the given object (arg1) by surrounding it with two buttons having
- the same border and shadow colors. Create a group containing the object
- and the buttons. This is suitable only for objects with the embossed
- shadow style, not those with drop-shadows.
- */
-
- call interactive(0)
-
- ob = arg(1)
- pg = getpage(ob)
- bd = getborder(ob)
- sh = getshadow(ob)
-
- left = getleft(ob)
- top = gettop(ob)
- width = getwidth(ob)
- height = getheight(ob)
-
- do i = 1 to 2
- b = relocate(createbutton(),pg)
- call setbackground(b,-1)
- call setborder(b,bd)
- call setshadow(b,sh)
- call shadowstyle(b,2)
- call scaletosize(b, width + 4 * i, height + 2 * i)
- call setposition(b, left - 2 * i, top - i)
- btn.i = b
- end
-
- g = creategroup()
- call relocate(btn.2,g)
- call relocate(btn.1,g)
- call relocate(ob,g)
- call relocate(g,':')
-